:root {
    --primary-color: #00c6ff;
    --primary-dark: #0072ff;
    --secondary-color: #7b61ff;
    --text-color: #ffffff;
    --light-bg: #0f172a;
    --card-bg: #1e293b;
    --card-shadow: 0 8px 32px rgba(0, 198, 255, 0.15);
    --glow-effect: 0 0 15px rgba(0, 198, 255, 0.5);
    --coin-color: #ffd700;
    --success-color: #4caf50;
    --error-color: #e53935;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 198, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(123, 97, 255, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    backdrop-filter: blur(10px);
}

header {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 198, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
    padding: 0 15px;
}

.header-controls {
    padding: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
   padding: 0 20px;
}

.score-display {
    display: flex;
    align-items: center;
    background-color: rgba(255, 215, 0, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* 速度菜单样式 */
.speed-menu-container {
    position: relative;
}

.speed-menu-btn {
    background-color: rgba(123, 97, 255, 0.1);
    border: 1px solid rgba(123, 97, 255, 0.3);
    border-radius: 20px;
    color: #7b61ff;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.speed-menu-btn:hover {
    background-color: rgba(123, 97, 255, 0.2);
    transform: translateY(-1px);
}

.speed-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid rgba(123, 97, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
    min-width: 100px;
    z-index: 100;
}

.speed-option {
    display: block;
    width: 100%;
    padding: 8px 15px;
    text-align: left;
    background-color: transparent;
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.speed-option:hover {
    background-color: rgba(123, 97, 255, 0.1);
}

.speed-option.active {
    background-color: #7b61ff;
    color: white;
    font-weight: bold;
}

.coin-icon {
    width: 24px;
    height: 24px;
    background: url('../images/coin.png') no-repeat center center;
    background-size: cover;
    margin-right: 8px;
    animation: coinFloat 3s ease-in-out infinite;
}

#scoreValue {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--coin-color);
}

@keyframes coinFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.coin-animation {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
}

.coin {
    width: 30px;
    height: 30px;
    background: url('../images/coin.png') no-repeat center center;
    background-size: cover;
    border-radius: 50%;
    position: relative;
}

.coin::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    transform: rotate(45deg);
    width: 14px;
    height: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    border-radius: 50%;
    opacity: 0.7;
}

.coin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pulse-animation {
    animation: pulse 0.3s ease-in-out;
}

.correct-animation {
    animation: correctPulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

h1 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 2rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 198, 255, 0.3);
}

.progress-container {
    width: 80%;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: var(--glow-effect);
}

main {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    border: 1px solid rgba(0, 198, 255, 0.2);
    transition: all 0.3s ease;
}

main:hover {
    box-shadow: 0 12px 40px rgba(0, 198, 255, 0.2);
}

.practice-section {
    margin-bottom: 30px;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid rgba(0, 198, 255, 0.3);
    padding-bottom: 10px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
    box-shadow: var(--glow-effect);
}

.instructions {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #666;
}

audio {
    margin-bottom: 20px;
}

.audio-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.audio-btn {
    background: linear-gradient(90deg, var(--coin-color), #ffb800);
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-right: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.audio-btn.playing {
    animation:喇叭播放 1s infinite;
}

@keyframes 喇叭播放 {
    0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 215, 0, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 25px rgba(255, 215, 0, 0.8); }
}

.audio-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 198, 255, 0.7);
}

/* 速度控制按钮样式 */
.speed-controls {
    display: inline-flex;
    margin-left: 15px;
    vertical-align: middle;
}

.speed-btn {
    background-color: rgba(123, 97, 255, 0.1);
    border: 1px solid rgba(123, 97, 255, 0.3);
    border-radius: 20px;
    color: #7b61ff;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 10px;
    margin: 0 3px;
    transition: all 0.3s ease;
}

.speed-btn:hover {
    background-color: rgba(123, 97, 255, 0.2);
    transform: translateY(-1px);
}

.speed-btn.active {
    background-color: #7b61ff;
    color: white;
    font-weight: bold;
   background-color: #3a7bc8;
}

.options-container {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

/* 确保单词选项容器两列排列 */
.container #wordOptions {
    grid-template-columns: repeat(2, 1fr);
}

/* 确保句子选项容器一列排列 */
.container #sentenceOptions {
    grid-template-columns: repeat(2, 1fr);
}

.option {
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1rem;
    backdrop-filter: blur(5px);
}

.option:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 198, 255, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 198, 255, 0.2);
}

.option.selected {
    background-color: #e8f4fd;
    border-color: var(--primary-color);
}

.option.correct {
    background-color: rgba(76, 175, 80, 0.15);
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    animation: pulse 1s ease-in-out;
}

.option.incorrect {
    background-color: rgba(229, 57, 53, 0.15);
    border-color: var(--error-color);
}

.feedback {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.feedback.correct {
    background-color: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.feedback.incorrect {
    background-color: rgba(229, 57, 53, 0.15);
    color: #ef5350;
    border: 1px solid rgba(229, 57, 53, 0.3);
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.nav-btn {
    background: linear-gradient(90deg, var(--secondary-color), #5343e8);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(123, 97, 255, 0.3);
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(123, 97, 255, 0.5);
    background-color: #4cae4c;
}

footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 20px 0;
    font-size: 0.9rem;
}

.hidden {
    display: none;
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    main {
        padding: 20px;
        border-radius: 12px;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .options-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .option {
        padding: 12px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .audio-btn, .nav-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}



/* 响应式调整 - 优化iPhone SE屏幕尺寸(320px)适配 */
@media screen and (max-width: 320px) {
    :root {
        font-size: 13px;
    }
    
    .container {
        padding: 8px;
    }
    
    header {
        padding: 12px;
    }
    
    h1 {
        font-size: 1.4rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .options-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .audio-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    main {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .options-container {
        grid-template-columns: 1fr 1fr;
    }

    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .audio-btn, .nav-btn {
        width: 100%;
    }
}